package com.fashion.model;


import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

/**
 * User: juventus
 * Date: 11-6-15
 * Time: 下午11:33
 */
@Entity
@Table(name = "news_column_item")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class NewsColumnItem {
    private String id;
    private String newsId;
    private String columnId;

    @Id
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name = "news_id", nullable = false)
    public String getNewsId() {
        return newsId;
    }

    public void setNewsId(String newsId) {
        this.newsId = newsId;
    }

    @Column(name = "column_id", nullable = false)
    public String getColumnId() {
        return columnId;
    }

    public void setColumnId(String columnId) {
        this.columnId = columnId;
    }

    /* @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
    @JoinColumn(name = "news_id", nullable = false)
    public News getNews() {
        return news;
    }

    public void setNews(News news) {
        this.news = news;
    }

    @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
    @JoinColumn(name = "column_id", nullable = false)
    public NewsColumn getNewsColumn() {
        return newsColumn;
    }

    public void setNewsColumn(NewsColumn newsColumn) {
        this.newsColumn = newsColumn;
    }*/
}
